import request from '@/utils/request'
const api = 'zzxt/api'

// 党团用户信息
import userinfo from './party-userinfo'
export const getUsersInfo = (item) => userinfo.getList(item)
export const postUsersInfo = (item) => userinfo.putItem(item)
export const updateUsersInfo = (item) => userinfo.patchItem(item)
export const deleteUsersInfo = (username) => userinfo.removeInfo({ username })
export const SelectZzmm = (id) => userinfo.typeInParty({ id })
export const getLaborArray = () => userinfo.partyDuties()

// 党团组织信息
import groupinfo from './party-group'
export const getGroupNum = (number) => groupinfo.getList({ company: number })
export const getUsersList = ({ company, groupid, page }) => groupinfo.members({
  company, page, groupid
})
export const getMemberStatistics = ({ company, groupid }) => groupinfo.memberStatistics({ company, groupid })

// 会议相关接口
export function getConferInfo(queryObject) {
  return request.post(`${api}/getConferInfo`, {
    params: { queryObject }
  })
}

export function postConferInfo(FormData) {
  debugger
  return request.post(`${api}/postConferInfo`, {
    params: { FormData }
  })
}

export function updateConferInfo(FormData) {
  debugger
  return request.post(`${api}/updateConferInfo`, {
    params: { FormData }
  })
}

export function deleteConferInfo(name, time) {
  return request.post(`${api}/deleteConferInfo`, {
    params: { name, time }
  })
}

// 党日相关接口
export function getDangriInfo(queryObject) {
  return request.post(`${api}/getDangriInfo`, {
    params: { queryObject }
  })
}

export function postDangriInfo(FormData) {
  return request.post(`${api}/postDangriInfo`, {
    params: { FormData }
  })
}

export function updateDangriInfo(FormData) {
  return request.post(`${api}/updateDangriInfo`, {
    params: { FormData }
  })
}

export function deleteDangriInfo(name, time) {
  return request.post(`${api}/deleteDangriInfo`, {
    params: { name, time }
  })
}
// 党课相关接口
export function getDangkeInfo(queryObject) {
  return request.post(`${api}/getDangkeInfo`, {
    params: { queryObject }
  })
}

export function postDangkeInfo(FormData) {
  return request.post(`${api}/postDangkeInfo`, {
    params: { FormData }
  })
}

export function updateDangkeInfo(FormData) {
  return request.post(`${api}/updateDangkeInfo`, {
    params: { FormData }
  })
}

export function deleteDangkeInfo(name, time) {
  return request.post(`${api}/deleteDangkeInfo`, {
    params: { name, time }
  })
}
// 谈心谈话相关接口
export function getTalkInfo(queryObject) {
  return request.post(`${api}/getTalkInfo`, {
    params: { queryObject }
  })
}

export function postTalkInfo(FormData) {
  return request.post(`${api}/postTalkInfo`, {
    params: { FormData }
  })
}

export function updateTalkInfo(FormData) {
  return request.post(`${api}/updateTalkInfo`, {
    params: { FormData }
  })
}

export function deleteTalkInfo(name, time) {
  return request.post(`${api}/deleteTalkInfo`, {
    params: { name, time }
  })
}
// 组织生活会相关接口
export function getZzshInfo(queryObject) {
  return request.post(`${api}/getZzshInfo`, {
    params: { queryObject }
  })
}

export function postZzshInfo(FormData) {
  return request.post(`${api}/postZzshInfo`, {
    params: { FormData }
  })
}

export function updateZzshInfo(FormData) {
  return request.post(`${api}/updateZzshInfo`, {
    params: { FormData }
  })
}

export function deleteZzshInfo(name, time) {
  return request.post(`${api}/deleteZzshInfo`, {
    params: { name, time }
  })
}
// 党员汇报相关接口
export function getDyhbInfo(queryObject) {
  return request.post(`${api}/getDyhbInfo`, {
    params: { queryObject }
  })
}

export function getDyfzMembers() { }
export function postDyhbInfo(FormData) {
  return request.post(`${api}/postDyhbInfo`, {
    params: { FormData }
  })
}

export function updateDyhbInfo(FormData) {
  return request.post(`${api}/updateDyhbInfo`, {
    params: { FormData }
  })
}

export function deleteDyhbInfo(name, time) {
  return request.post(`${api}/deleteDyhbInfo`, {
    params: { name, time }
  })
}
// 民主评议相关接口
export function getMzpyInfo(queryObject) {
  return request.post(`${api}/getMzpyInfo`, {
    params: { queryObject }
  })
}

export function postMzpyInfo(FormData) {
  return request.post(`${api}/postMzpyInfo`, {
    params: { FormData }
  })
}

export function updateMzpyInfo(FormData) {
  return request.post(`${api}/updateMzpyInfo`, {
    params: { FormData }
  })
}

export function deleteMzpyInfo(name, time) {
  return request.post(`${api}/deleteMzpyInfo`, {
    params: { name, time }
  })
}
// 思想政治教育相关接口
export function getSxjyInfo(queryObject) {
  return request.post(`${api}/getSxjyInfo`, {
    params: { queryObject }
  })
}

export function postSxjyInfo(FormData) {
  return request.post(`${api}/postSxjyInfo`, {
    params: { FormData }
  })
}

export function updateSxjyInfo(FormData) {
  return request.post(`${api}/updateSxjyInfo`, {
    params: { FormData }
  })
}

export function deleteSxjyInfo(name, time) {
  return request.post(`${api}/deleteSxjyInfo`, {
    params: { name, time }
  })
}
// 获取单位思想政治教育情况和个人情况
export function getPerEducationSitu(queryObject) {
  return request.post(`${api}/getPerEducationSitu`, {
    params: { queryObject }
  })
}

export function getPerEductionCount(queryObject) {
  return request.post(`${api}/getPerEductionCount`, {
    params: { queryObject }
  })
}

export function getCompanyEductionCount(queryObject) {
  return request.post(`${api}/getCompanyEductionCount`, {
    params: { queryObject }
  })
}
